﻿using System;
using System.Windows.Forms;

namespace ToolUtil
{
    public class FrmConfig
    {
        public static bool checkChildFrmExist(string childFrmName)
        {
            //Console.WriteLine("ceshi:"+childFrmName);
            foreach (Form form in Application.OpenForms)
            {
                //Console.WriteLine("open:" + form.Name);
                if (form.Name == childFrmName)
                {
                    if (form.WindowState == FormWindowState.Minimized)
                    {
                        form.WindowState = FormWindowState.Maximized;
                    }
                    form.Activate();
                    return true;
                }
            }
            return false;
        }
    }
}
